package cn.com.mayue.guava.collections;

import com.google.common.collect.ArrayListMultimap;
import org.junit.Test;

/**
 * Created by mayue on 2016/12/22.
 */
public class ArrayListMultimapTest {
    @Test
    public void test() {
        //一个key对应多个值，key:ArrayList 格式,支持一个key对应重复的值
        ArrayListMultimap<String, String> multiMap = ArrayListMultimap.create();
        multiMap.put("test", "1");
        multiMap.put("test", "2");
        multiMap.put("test", "3");
        multiMap.put("test", "3");
        System.out.println(multiMap.get("test"));
        System.out.println(multiMap.containsValue("2"));
    }
}
